package db

import (
	"git.sr.ht/~mil/mobroute/src/utilfuncs"
)

func dbfunc_ext_timesecformat(seconds uint) string {
	return utilfuncs.DurationFormatSecs(seconds)
}

func dbfunc_ext_haversinedistkm(aLat, aLon, bLat, bLon float64) float64 {
	return utilfuncs.DistHaversine(
		utilfuncs.Coord{Lat: aLat, Lon: aLon},
		utilfuncs.Coord{Lat: bLat, Lon: bLon},
	)
}
